<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>


    <script>

        //比较数组中最大值
        /* var arr = [2,6,1,77,52,25,7];
        var max=arr[0];
        for (var i = 1; i < arr.length; i++) {
            if(max<arr[i]){
                max=arr[i];
            }
            
        }
        console.log(max); */

        //当前日期
        var today=new Date();
        var year=today.getFullYear();
        var month=today.getMonth()+1;
        var date=today.getDate();
        var day=today.getDay();
        var arr=['星期日','星期一','星期二','星期三','星期四','星期五','星期六'];
        console.log('今天是'+year+'年'+month+'月'+date+'日，'+arr[day]);







    </script>
</head>
<body>
    
</body>
</html>